package me.zhenqu.model.dao.impl;

import me.zhenqu.model.dao.PascodeDao;
import me.zhenqu.model.pojo.entity.Pascode;
import org.springframework.stereotype.Repository;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: yibing.tan
 * Date: 11-11-9
 * Time: 上午11:18
 * To change this template use File | Settings | File Templates.
 */
@Repository("pascodeDao")
public class PascodeDaoImpl extends ZhenquDaoHelper<Pascode> implements PascodeDao {

    @Override
    public Pascode findByID(Long user_id) {
        List list = getHibernateTemplate().find("from Pascode where user_id=?",user_id);
        if (list==null||list.isEmpty()) return null;
		return (Pascode)list.get(0);
    }
}
